<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<link rel="stylesheet" href="./animate.css">
	<script src="./vue.js"></script>
	<script src="./velocity.js"></script>
</head>
<style>
	.v-enter, .v-leave-to {opacity: 0}
	.v-enter-active, .v-leave-active {transition: opacity 1s;}
</style>
<body>
	<div id="root">
		<transition mode="out-in">
			<div v-if="show" key="hello">hello world</div>
			<div v-else key="bye">Bye world</div>
		</transition>
		<button @click="handleClick">切换</button>
	</div>
	
	<script>
		var vm = new Vue({
			el: '#root',
			data: {	
				show: true
			},
			methods: {
				handleClick () {
					this.show = !this.show;
				}
			}
		})
	</script>
</body>
</html>